<?php
/**
 * Created by PhpStorm.
 * User: huyang
 * Date: 16/10/29
 * Time: 下午8:01
 */

namespace App\Http\Repositories\Eloquent;


class Article extends Orm
{

    public function getContentAttribute()
    {
        return str_replace("&#039;","'",htmlspecialchars_decode($this->attributes['content']));
    }

    public function getPubDateAttribute() {
        return substr($this->attributes['pub_date'], 0, 10);
    }

    public function getJumpAttribute() {
        return htmlspecialchars_decode($this->attributes['jump']);
    }
}